<div class="fui-page fui-page-current">
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click="goback();"></a>
        </div>
        <div class="title">我的信息</div>
    </div>
    <div class="fui-content">
		<div class="fui-tab fui-tab-danger" style="top:0">
			<a ng-if="pagedata.ping.isclose!=1" ng-class="{'item':1,'active':pagedata.params.type == 0}" href="javascript:" ng-click="pagedata.params.type=0;tool.get_list('jy_xiangqin/msglog/getlist/',true)">撩我的</a>
			<a ng-if="pagedata.ping.isclose!=1" ng-class="{'item':1,'active':pagedata.params.type == 2}" href="javascript:" ng-click="pagedata.params.type=2;tool.get_list('jy_xiangqin/msglog/getlist/',true)">我撩的</a>
			<a ng-class="{'item':1,'active':pagedata.params.type == 3}" href="javascript:" ng-click="pagedata.params.type=3;tool.get_list('jy_xiangqin/msglog/getlist/',true)">我的聊天</a>
			<a ng-class="{'item':1,'active':pagedata.params.type == 1}" href="javascript:" ng-click="pagedata.params.type=1;tool.get_list('jy_xiangqin/msglog/getlist/',true)">系统消息</a>
		</div>
		<div style="padding:0 0.5rem">
        <div class="fui-cell-group radius" ng-repeat="item in pagedata.list track by item.id">
		<div class="fui-cell">
			<div ng-if="pagedata.params.type != 1" class="fui-cell-label" style="width:3.5rem" href="javascript:;" ng-click="access_json('jy_xiangqin/memberitem//mid='+item.mid)">
				<img class="round" style="width:3rem;height:3rem;border-radius:3rem" ng-src="{{tomedia(item.member.avatar) || '../addons/jy_xiangqin/resource/images/nologo.png'}}">
			</div>
			<div class="fui-cell-text">
				<div ng-if="pagedata.params.type != 1" class="title" style="font-size:0.76rem">
					<span class="bold" style="font-size:0.8rem;width:auto;margin-right:0.2rem">{{item.member.nickname || '无昵称'}}</span>
					<i ng-if="item.member.sex==2" class="icon icon-nv red"></i>
					<i ng-if="item.member.sex==1" class="icon icon-nan" style="color:#18bc9c"></i>
				</div>
				<div class="title gray" style="font-size:0.6rem">
				   {{item.desc || '无'}}
				</div>
				<div class="subtitle" style="font-size:0.5rem">
				    {{item.createtime}}
				</div>
			</div>
			<div class="fui-cell-remark noremark" style="font-size:0.5rem;color:#999">
				<i class="icon icon-map" style="font-size:0.5rem;"></i>
				<span ng-if="item.member.city!=pagedata.pcd.city">{{item.member.city||'**'}}</span>
				<span ng-if="item.member.city==pagedata.pcd.city">{{item.member.juli||'**'}}km</span>
			</div>
		</div>
		<div class="fui-cell" style="padding:0">
			<div ng-if="item.status<=1 && (pagedata.params.type == 0 || pagedata.params.type == 3)" class="fui-cell-info c">
				<span class="btn btn-black" ng-click="pagedata.nodian(item.id)">无电感</span>
			</div>
			<div ng-if="item.status<=1 && (pagedata.params.type == 0 || pagedata.params.type == 3)" class="fui-cell-info c">
				<span class="btn btn-success" ng-click="pagedata.yuered(item.id)">约红娘</span>
			</div>
			<div ng-if="item.status>1" class="fui-cell-info c" style="padding:0.3rem">
				<span class="gray" ng-if="item.status==2">已回复处理：无电感</span>
				<span class="gray" ng-if="item.status==3">已回复处理：约红娘</span>
			</div>
			<div ng-if="pagedata.params.type != 1" class="fui-cell-info c">
				<div class="btn btn-red-o" style="padding:0 1rem;position: relative;" href="javascript:;" ng-click="access_json('jy_xiangqin/tcplog//tomid='+item.member.mid)">
				<span class="badge" style="position: absolute;left:2.6rem" ng-if="item.noread>0">{{item.noread}}</span>
				聊天
				</div>
			</div>
		</div>
		</div>
		</div>
		<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
		<div ng-if="pagedata.list.length==0" class='content-empty' >
			<i class="icon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i>
			<br/>
			<p style="color: #999;font-size: .75rem">暂时没有任何消息</p>
		</div>

    </div>
	<div ng-include="sys_html('_footer')"></div>
</div>
<div ng-include="sys_html('common/_yuered')"></div>

<script>
scope.tool.get_list('jy_xiangqin/msglog/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_xiangqin/msglog/getlist/');
}
scope.pagedata.nodian=function(logid){
	scope.confirm({
		'message':'确定【无电感】，不想进一步认识吗？',
		'success':function(){
			if(scope.pagedata.params.type == 3){
				var action='/msglog/nodian2/id='+logid
			}else{
				var action='/msglog/nodian/id='+logid
			}
			scope.post_json('/msglog/nodian/id='+logid,{},function(res){
				scope.message(res);
			});
		},
		'fail':function(){}
	});
}
scope.pagedata.yuered=function(logid){
	scope.confirm({
		'message':'确定【约红娘】吗？请工作时间9点至20点保持手机畅通，红娘会在1天内为您搭桥线下服务。',
		'success':function(){
			if(scope.pagedata.params.type == 3){
				var action='/msglog/yuered2/id='+logid
			}else{
				var action='/msglog/yuered/id='+logid
			}
			scope.post_json('/msglog/yuered/id='+logid,{},function(res){
				scope.message(res);
			});
		},
		'fail':function(){}
	});
}
</script>

